package com.liuzd.ssm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.liuzd.ssm.entity.User;
import com.liuzd.ssm.mapper.UserMapper;

@Service("userServices")
public class UserService {
		
	@Autowired
	private UserMapper userMapper;	

	public void addUser(User user) {
		this.userMapper.addUser(user);	
	}
	
	public int checkUserExits(User user) {			
		return this.userMapper.checkUserExits(user);		
	}

	public void delUser(String userId) {
		this.userMapper.delUser(userId);
	}


	public User getUserByUid(String userId) {		
		return (User)this.userMapper.getUserByUid(userId);
	}

	public List<User> getUserList() {		
		return (List<User>)this.userMapper.getUserList();
	}	

	public void editUser(User user) {		
		this.userMapper.editUser(user);
	}
	
}
